{extend name="public:common_index"/}
{block name="main"}
    <div class="panel panel-default">
        <div class="panel-heading">
            <h3 class="panel-title"><i class="fa fa-list"></i> {$title}</h3>
        </div>
        <div class="panel-body">
            <div class="navbar navbar-default">
                <form action="" id="search-form2" class="navbar-form form-inline" method="get" onsubmit="return false">
                    <div class="form-group">

                        <label class="control-label" for="input-order-id">MIYO ID</label>
                        <div class="input-group">
                            <input type="text" name="uuid" value="{$Think.get.uuid}" placeholder="MIYO ID"
                                   class="form-control">
                        </div>

                        <label class="control-label" for="input-order-id">昵称</label>
                        <div class="input-group">
                            <input type="text" name="nick_name" value="{:trim(input('nick_name'))}" placeholder="昵称"
                                   id="input-order-id" class="form-control">
                        </div>
                        <label class="control-label" for="input-order-id">是否查看</label>
                        <select class="form-control" name="is_read">
                            <option id="is_read2" value="">全部</option>
                            <option id="is_read1" value="1"> 已查看</option>
                            <option id="is_read0" value="0">未查看</option>
                        </select>
                        <label class="control-label" for="input-order-id">状态</label>
                        <select class="form-control" name="status">
                            <option id="status2" value="">全部</option>
                            <option id="status1" value="1"> 已处理</option>
                            <option id="status0" value="0">未处理</option>
                        </select>


                        <button type="submit" onclick="javascript:document.getElementById('search-form2').submit();"
                                id="button-filter search-order" class="btn btn-primary"><i class="fa fa-search"></i> 筛选
                        </button>
                    </div>

                    <!--<a href="{:Url('edit')}" class="btn btn-primary pull-right"><i class="fa fa-plus"></i>添加</a>-->
                    <!--<a href="{:url('examiner_batch')}" class="btn btn-primary pull-right"><i class="fa fa-folder-open-o"></i>批量导入</a>-->
                </form>
            </div>
            <div id="ajax_return">
                <form method="post" enctype="multipart/form-data" target="_blank" id="form-order">
                    <div class="table-responsive">
                        <table class="table table-bordered table-hover">
                            <thead>
                            <tr>
                                <td>序号</td>
                                <td>用户昵称</td>
                                <td>内容摘要</td>
                                <td>反馈时间</td>
                                <td>是否查看</td>
                                <td>是否处理</td>
                                <td>操作</td>
                            </tr>
                            </thead>
                            <tbody>
                            <!-- 列表循环开始 -->
                            {volist name="rows" id="row" key="key"}
                            <tr>
                                <td>{$key}</td>
                                <td>{$row.nick_name}</td>
                                <td>{$row.content|sub_str=60}</a></td>
                                <td>{$row.create_time}</td>
                                <td>{if condition="$row.is_read == 1"} 已查看 {else /} 未查看 {/if}</td>
                                <td>{if condition="$row.status == 1"} 已处理 {else /} 未处理 {/if}</td>
                                <td>
                                    {if condition="$row.status == 1"}  <a class="btn btn-default ">已处理</a>
                                    {else /} <a class="btn btn-primary " href="{:url('op_edit',['id'=>$row.oid])}}">查看</a>
                                    {/if}
                                    <span class="btn btn-danger check_del" data-message="" data-url="/message/op_del/id/{$row.oid}">删除</span>
                                </td>
                            </tr>
                            {/volist}
                            <!-- 列表循环结束 -->
                            </tbody>
                        </table>
                    </div>
                </form>
            </div>
            <div id='pagerarea'>{$pageHTML}</div>
        </div>
    </div>
{/block}

{block name="js"}
<script>
    $(function () {
        var status   = "{$row.status}";
        if(status){
            $('#status'+status).attr('selected',true)
        }
        var is_read = "{$Think.get.is_read}"
        $('#is_read'+is_read).attr('selected','selected');

        var type = "{$Think.get.type}"
        $('#type'+type).attr('selected','selected')
    })

</script>



{/block}



